The present invention relates to computer networks. More particularly, the invention relates the testing and simulation of computer networks, and to a scripting language, also referred to as a stimulus/response engine, for modeling state machines used in the testing of computer network protocols.
Traffic on computer networks is composed of multiple protocol interactions which work in concert to provide connectivity, bandwidth utilization, content provisioning, security, and reliability. Often multiple protocols are required in the course of a transaction to achieve a network application objective. Emulating this behavior in the test lab without installing and configuring all of the devices and protocols involved in such a transaction is a significant challenge facing network equipment vendors and consumers.
A tool that is useful in network protocol testing is a network traffic analyzer (NTA). An example of a NTA is the Pagent(trademark) product developed by Cisco Systems, Inc. (xe2x80x9cCiscoxe2x80x9d). Pagent is a version of the Cisco Internet Operating System (IOS(copyright)) which has been modified to generate and receive network traffic for network simulation and testing purposes. However, NTAs like Pagent have limited utility as test systems since they are not able to respond to the content of test packets (xe2x80x9cstimulixe2x80x9d), and cannot be programmed to provide test scenarios for a variety of protocols. Instead, an NTA is only able to generate, send, receive and count packets.
Network testing tools have been developed which address sub-components of these protocols (individual protocol conformance test suites). For example, Midnight Networks, Inc. has a tool, ANVL, which provides an application performance interface (API) set that can be used to create individual protocol conformance test suites. However, this tool is implemented in the computer language C, and requires a C development environment in order to be used.
Alternative systems, such as a protocol analyzer available from Hewlett-Packard, provide hard-coded NTAs which are able to provide responses to packet content, but only in a very narrow, predefined manner. Such systems cannot be programmed to test a variety of protocols, and are not capable of implementing dynamic test scenarios, that is, scenarios in which packets are modified during the course of the test.
Thus, current network test systems are limited to individual protocols, unable to respond to packets other than to count them (that is, they cannot respond to packet content), or are hard-coded so that packets transmitted by a network traffic analyzer have known content in a narrowly-defined range with predefined responses. Moreover, conventional network test systems are not dynamically configurable to different protocols by the user, and are not dynamic. This is particularly a problem for newly-developed protocols since dedicated test systems are expensive to construct and are typically developed at a much later time.
Accordingly, what is needed is a test system which can replicate the rich, dynamic protocol interactions and dialogues necessary to test and model behavior in network protocol stacks.
The present invention meets this need by providing test systems, methods, and media which allow a user to script any type of test or model scenario based on a particular type of network traffic (e.g., protocol interaction). In preferred embodiments, the script provides for the generation of packets (stimuli) which are used to provoke responses in order to model or test proper operation of one or more network protocols. The invention includes a scripting language, also referred to as a stimulus/response engine, which includes commands specifying a state change of a network device, and provides for the establishment of packet filters based on expected network traffic, receiving and matching arriving packets with packet filters, and, where there is a match, conducting actions specified by the user in the script.
A stimulus/response engine (SRE) in accordance with the present invention is dynamic in that it accommodates patterns (packet filters) which are modified during test runs. The SRE is fully programmable by the user and thus can be used to design models and test scenarios for a variety of network protocols, including new protocols developed by the user for which no testing packages exist.
A SRE in accordance with the present invention is built on a state machine model. Since many internet protocols are also defined in terms of state machine models, these protocols may be easily translated into a SRE script for testing and simulation purposes. As noted, a SRE in accordance with the present invention is scriptable, so that it may be modified and extended to test a variety of network protocols. A SRE in accordance with the present invention also uses a send/expect model in its scripting format.
In one aspect, the present invention provides a method, implemented on a computing device, for simulating one or more network activities. The method involves providing program code for generating a model of one or more network devices. The program is written in a language that includes commands specifying a state change of a network device. The program code is then converted, preferably using an interpreter, to machine executable instructions for executing the model.
In another aspect, the invention provides a computer program product including a computer-usable medium having computer-readable program code embodied thereon for effecting such a method.
In yet another aspect, the invention provides a system for controlling the generation of a model of one or more network devices, with the aid of a network device. The system includes a converter that recognizes program code commands specifying a state change of a network device and converts such program code to produce a model of one or more network devices, and a network device operating system on which the program code runs.